//
//  ExpenseStore.swift
//  PennPal
//
//  Created by Rena Li on 11/22/25.
//

import SwiftUI

class ExpenseStore: ObservableObject {
    @Published var expenses: [Expense] = []

    func add(_ expense: Expense) {
        expenses.append(expense)
    }

    var spentThisMonth: Double {
        expenses.reduce(0) { $0 + $1.amount }
    }
}
